<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<%@include file="/commons/commonList.jsp" %>

<script type="text/javascript">

	function init(){
		var frameObj = parent.window.document.all('customerDispatchFormList');
		if(frameObj == null){ //如果为空 则判断是客服事件详细使用
			frameObj = parent.window.document.all('signReadingFrame');
			document.getElementById("divId").style.height = "290px";
			document.getElementById("divId").style.overflow = 'auto';
		}
		frameObj.style.height=document.body.scrollHeight;
	}
	function setCurrentId(id){
		parent.setCurrentdispatchFormId(id);
	}

	function refleshFrame(){
	parent.refleshFrame();
	}

	function rightMenu(event){

	if('${MenuFlat}'=='false'){
	return false;
	}

	return ShowContextMenu(event,'quick_rightmenu');
	}

</script>
</head>
<body onload="init();">
<div id="divId">
	<ec:ceTable items="dispatchFormList"
			autoIncludeParameters="true"
			var="dispatchFormItem"
			action="${ctx}/customerService_dispatchFormAction.do?method=queryDispatchFormByPage"
			rowsDisplayed="${pageSize}"
			width="100%"
			view="pmsview"
			styleClass="gridData"
			>
			<ec:ceRow styleClass="grid" onclick="setCurrentId('${dispatchFormItem.keyword}');" ondblclick="parent.dispatchFormDetail();return false" onContextMenu="return rightMenu(event);">
				<ec:ceColumn headerCell="pmsHeadrCell" width="10%" property="dispatchNo" title="派工单号" sortable="true"></ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="7%" property="houseNumber" title="房号" sortable="true"></ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="10%" property="fullAddress" title="详细地点"></ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="17%" property="serviceContent" title="服务内容"></ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="8%" property="contact" title="联系人"></ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="8%" property="deptName" title="接单部门"></ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="8%" property="emergencyDegreeName" title="紧急程度" sortable="true"></ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="11%" property="endTime" title="完工时间" cell="date" format="yyyy-MM-dd HH:mm" ></ec:ceColumn>
				<ec:ceColumn headerCell="pmsHeadrCell" width="6%" property="statuz" title="状 态" sortable="true">${dispatchFormItem.statuName}</ec:ceColumn>
			   <ec:parameter name="customerEventId" value="${customerEventId}"></ec:parameter>
			    <ec:parameter name="deptId" value="${deptId}"></ec:parameter>
			   <ec:parameter name="houseNumber" value="${houseNumber}"></ec:parameter>
			   <ec:parameter name="dispatchNo" value="${dispatchNo}"></ec:parameter>
			   <ec:parameter name="serviceContent" value="${serviceContent}"></ec:parameter>
              <ec:parameter name="MenuFlat" value="${MenuFlat}"></ec:parameter>
              <ec:parameter name="mainFlat" value="${mainFlat}"></ec:parameter>
			</ec:ceRow>
	</ec:ceTable>
</div>
<!--------------------右键菜单---------------------->
<div id="quick_rightmenu" style="display:none;" oncontextmenu="return false" class="quick_rightmenu">
  <table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg">
    <tr>
      <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
        <pms:AuthTag authName="customerService_dispatchFormAction.do?method=addDispatchForm">
        <tr id="quick_rightmenu_one">
          <td class="quickMenu_toolbarico"><a href="#"  onClick="parent.addDispatchForm();return false;"onFocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" border="0" align="absbottom" alt="新增"/>&nbsp;新 增</a></td>
       </tr>
       </pms:AuthTag>
       <pms:AuthTag authName="customerService_dispatchFormAction.do?method=disannulDispatchForm">
        <tr id="quick_rightmenu_two">
          <td class="quickMenu_toolbarico"><a href="#" onFocus="this.blur()" onClick="parent.disannulDispatchForm();return false;"><img src="${ctx}/images/ico_delete.gif" alt="作废" border="0" align="absbottom"/>&nbsp;作 废</a></td>
        </tr>
		<tr id="quick_rightmenu_three">
		   <td class="hrpading"><table width="95%" border="0" align="left" cellpadding="0" cellspacing="0">
		     <tr><td class="quickMenu_line"></td></tr></table></td>
        </tr>
         </pms:AuthTag>
       <pms:AuthTag authName="customerService_dispatchFormAction.do?method=receiveDispatchForm">
         <tr>
         <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.dispatchingAdd();return false;"onfocus="this.blur()"><img src="${ctx}/images/ico_quit.gif" alt="接单登记" height="16" border="0" align="absbottom" />&nbsp; 接单登记</a></td>
        </tr>
         </pms:AuthTag>
       <pms:AuthTag authName="customerService_dispatchFormAction.do?method=navigateChargeItemManage">
	<tr>
       <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.chargeItemManage();return false;"onfocus="this.blur()"><img src="${ctx}/images/ico_feiyong_qd.gif" alt="费用清单" width="16" height="16" border="0" align="absbottom"/>&nbsp;费用清单</a></td>
        </tr>
         </pms:AuthTag>
       <pms:AuthTag authName="customerService_custServiceChargeAction.do?method=navigateChargeCalculateMain">
		<tr>
       <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.chargeCalculate();return false;"onfocus="this.blur()"><img src="${ctx}/images/ico_zxsf_sq.gif" alt="费用核算" width="16" height="16" border="0" align="absbottom"/>&nbsp;费用核算</a></td>
        </tr>
         </pms:AuthTag>
       <pms:AuthTag authName="customerService_feedbackRecordAction.do?method=navigateFeedbackRecordMain">
		<tr>
          <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.feedbackRecord();return false;"onfocus="this.blur()"><img src="${ctx}/images/ico_huifang.gif" alt="反 馈" width="16" height="16" border="0" align="absbottom"/>&nbsp;反 馈</a></td>
        </tr>
         </pms:AuthTag>
       <pms:AuthTag authName="button.report.dispatchForm">
        <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.showReport();return false;"onfocus="this.blur()"><img src="${ctx}/images/ico_Confirmation.gif" alt="预览派工单" width="16" height="16" border="0" align="absbottom"/>&nbsp;预览派工单</a></td>
        </tr>
        </pms:AuthTag>
      </table></td>
    </tr>
  </table>
  <script type="text/javascript">
  if(document.getElementById("quick_rightmenu_one")==null && document.getElementById("quick_rightmenu_two")==null){
   if(document.getElementById("quick_rightmenu_three")!=null)
   document.getElementById('quick_rightmenu_three').style.display="none";
  }

	var div1=document.getElementById('quick_rightmenu');
	if(div1.getElementsByTagName("tr").length==1){
	div1.innerHTML="";
	}


</script>
</div>
</body>
</html>